<template>
  <div class="not-found">
    <div class="container">
      <div class="not-found-content">
        <div class="error-icon">
          <el-icon :size="120">
            <Document />
          </el-icon>
        </div>
        
        <h1 class="error-title">404</h1>
        <h2 class="error-subtitle">页面未找到</h2>
        <p class="error-desc">
          抱歉，您访问的页面不存在或已被删除。
        </p>
        
        <div class="error-actions">
          <el-button type="primary" size="large" @click="goHome">
            <el-icon><House /></el-icon>
            返回首页
          </el-button>
          <el-button type="default" size="large" @click="goBack">
            <el-icon><Back /></el-icon>
            返回上页
          </el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

/**
 * 返回首页
 */
const goHome = () => {
  router.push('/')
}

/**
 * 返回上一页
 */
const goBack = () => {
  router.go(-1)
}
</script>

<style lang="scss" scoped>
.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
}

.not-found-content {
  text-align: center;
  max-width: 500px;
  padding: var(--spacing-2xl);
}

.error-icon {
  color: var(--text-tertiary);
  margin-bottom: var(--spacing-xl);
}

.error-title {
  font-size: 6rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.error-subtitle {
  font-size: var(--font-size-2xl);
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
}

.error-desc {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-2xl);
}

.error-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .error-title {
    font-size: 4rem;
  }
  
  .error-subtitle {
    font-size: var(--font-size-xl);
  }
  
  .error-desc {
    font-size: var(--font-size-base);
  }
  
  .error-actions {
    flex-direction: column;
    align-items: center;
  }
}
</style> 